from spirems import Service, def_msg

def callback_f(msg):
    res_msg = def_msg('std_msgs::String')
    res_msg['data'] = 'copy: ('+msg['data']+'), hello client!'
    return res_msg

# 服务地址，接收请求类型，返回响应类型，回调函数
ss = Service('/service1', 'std_msgs::String', 'std_msgs::String', callback_f)
